<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:include page="loginstatus.jsp" />
<%@ page import="model.*" %>
<%@ taglib prefix="s" uri="/struts-tags" %>   
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'importTeacher.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/common.css">
	

  </head>
  <body>
  <div id="main">
  <fieldset>
  	<legend>
  		修改学生成绩信息
  	</legend>
  	<form name="searchform" action="editscore.action" method="post">
  	<input type="hidden" name="id" id="id" value="<s:property id="score" value="id" />"/>
  	<table>
  		<tr class="trTitle">
  			<td colspan="8"><font color="">修改学生成绩信息</font></td>
  		</tr>
  		<%
  		int i=1;
  		 %>
	   	<s:iterator value="scores" status="score"> 
	   		<s:iterator value="students[#score.index]" status="student">
	   			<tr <%if(i%2==0) out.print("class='trstyle1'"); else out.print("class='trstyle2'");%>>
					<td class="tdstyle1">学号</td><td><s:property id="student" value="stunumber" /></td>
					<td class="tdstyle1">姓名</td><td><s:property id="student" value="stuname" /></td>
					<td class="tdstyle1">性别</td><td><s:property id="student" value="stusex" /></td>
				</tr>
			</s:iterator>		
			<tr>
				<td class="tdstyle1">学院</td>	
				<td>
					<s:iterator value="specials[#score.index]" status="special">
						<s:property id="special" value="specialname" />
					</s:iterator>
				</td>
				<td class="tdstyle1">专业</td>
				<td>
					<s:iterator value="departments[#score.index]" status="department">
						<s:property id="department" value="departmentname" />
					</s:iterator>
				</td>
			</tr>
			<tr>
				<td class="tdstyle1">课程</td>
				<td>
					<s:iterator value="courses[#score.index]" status="course">
						<s:property id="course" value="coursename" />
					</s:iterator>
				</td>
				<td class="tdstyle1">课程类别</td>
				<td>
					<s:iterator value="coursetypes[#score.index]" status="coursetype">
						<s:property id="coursetype" value="coursetype" />
					</s:iterator>
				</td>
			</tr>
			<tr>
				<td class="tdstyle1">老师</td>
				<td>	
					<s:iterator value="teachers[#score.index]" status="teacher">
						<s:property id="teacher" value="teachername" />
					</s:iterator>
				</td>
				<td class="tdstyle1">学期</td>
				<td>	
					<s:iterator value="studentcourses[#score.index]" status="studentcourse">
							<s:property id="studentcourse" value="xueqi" />
						</s:iterator>
				</td>
			</tr>
			<tr>
				<td class="tdstyle1">考试分</td>
				<td><input type="text" name="kaoshifen" id="kaoshifen" value="<s:property id="score" value="kaoshifen" />"/></td>
				<td class="tdstyle1">平时分</td>
				<td><input type="text" name="pingshifen" id="pingshifen" value="<s:property id="score" value="pingshifen" />"/></td>
			</tr>
			<tr>
				<td class="searchTd"><input type="submit" value="保存" class="button"/></td>
			</tr>
		<%
		i++;
		 %>
		</s:iterator> 
		<%
		if(i==1)
		{
		%>
		<tr><td><font color="#ff0000"><%out.println("您输入的分数中含有非法字符,分数必须为数字"); %></font></td></tr>
		<tr><td><font color="#ff0000"><input type="button" value="返回" class="button" onclick="javascript:history.back(-1);"/></font></td></tr>
		<%
		}
		 %>
	</table>
	</form>
  </fieldset>
  </div>
 
  </body>
</html>